import cx_Oracle

class DBConnection:
    def __init__(self):
        pass
    
    def getConnection(self):
        formatString = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)" +"(HOST=%s)(PORT=%d)))(CONNECT_DATA=(SID=%s)))"
        args = ("192.168.1.20", 1521, "inst20")
        result = cx_Oracle.makedsn(*args)

        ora = cx_Oracle.connect("unsins","password",result)

        return ora;
        
